package com.ruoyi.boat.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 告警历史对象 t_alert_history
 *
 * @author ruoyi
 * @date 2023-08-01
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class AlertHistory extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 波浪艇编号
     */
    @Excel(name = "波浪艇编号")
    private String boatCode;

    /**
     * 告警类型 0 超时 1 状态 2 超速
     */
    @Excel(name = "告警类型", readConverterExp = "0=超时,1=超速,2=开关量")
    private Integer alertType;

    /**
     * 开关量类型
     */
    @Excel(name = "开关量类型", readConverterExp = "0=出水报警,1=航控舱进水报警,2=舵机舱进水报警,3=电力推进器故障报警,4=矢量控制故障报警,5=脐带缆故障报警,6=开舱报警")
    private Integer bitType;

    /**
     * 告警值 超时 秒 超速 节 状态 状态值
     */
    @Excel(name = "告警值")
    private Long value;

    /**
     * 状态 0 正常 1 告警
     */
    @Excel(name = "状态", readConverterExp = "0=正常,1=告警")
    private Integer status;

    /**
     * 描述
     */
    @Excel(name = "描述")
    private String content;

    /**
     * 告警时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "告警时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date time;

}
